<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ include file="/views/common/taglibs.jsp" %>

<!DOCTYPE>
<html>
<head>
    <!-- 引入通用js、css文件(xiaogq) -->
    <meta name="decorator" content="bootstrap"/>
    <link rel="stylesheet" type="text/css" href="${ctx}/css/system/custom/entity/entity_list.css"/>
</head>
<body>
    <!-- 加载列表操作 -->
    <div class="button_list">
        <jsp:include page="/views/common/operation/sys_operation.jsp" flush="true" />
    </div>

    <div class="menu">
        <span class="active">系统属性</span><c:if test="${entity.defineField}"><span>自定义属性</span></c:if>
        <input type="hidden" id="tableCode" value="${entity.tableCode}"/>
        <input type="hidden" id="inchinese" value="${entity.inchinese}"/>
    </div>
    <div class="entity_div">
        <table id="field_table1"
               data-striped="true"
               data-toggle="table"
               data-show-columns="false"
               data-cookie="false"
               data-pagination="true"
               data-search="false"
               data-url="${ctx}/FieldRecord/queryFieldList.do?entityId=${entity.tableCode}&sysField=1"
               data-side-pagination="server"
               data-checkbox-header="true"
               data-page-list="[10,20,50,1000]"
               class="table">
            <thead>
            <tr>
                ${columns}
            </tr>
            </thead>
        </table>
    </div>
    <c:if test="${entity.defineField}">
        <div class="entity_div" style="display: none;">
            <table id="field_table2"
                   data-striped="true"
                   data-toggle="table"
                   data-show-columns="false"
                   data-cookie="false"
                   data-pagination="true"
                   data-search="false"
                   data-url="${ctx}/FieldRecord/queryFieldList.do?entityId=${entity.tableCode}&sysField=0"
                   data-side-pagination="server"
                   data-checkbox-header="true"
                   data-page-list="[10,20,50,1000]"
                   class="table">
                <thead>
                <tr>
                    ${columns}
                </tr>
                </thead>
            </table>
        </div>
    </c:if>

    <script>
        $(function(){
            $(".menu span").click(function(){
                var index=$(this).index();
                $(this).addClass("active").siblings().removeClass("active");
                $(".entity_div").eq(index).show().siblings(".entity_div").hide();
            });
        });
    </script>
    <!-- 引入出来表格列头操作按钮方法js(xiaogq) -->
    <script type="text/javascript" src="${ctx}/js/system/operation/show_colOperation.js"></script>
    <!-- 引入系统设置模块所有操作处理方法js(xiaogq) -->
    <script type="text/javascript" src="${ctx}/js/system/operation/sys_operation.js"></script>
</body>
</html>
